#! /bin/sh /usr/share/dpatch/dpatch-run
## 06_unit_dbase.dpatch by  <Mazen Neifer <mazen.neifer@supaero.org>>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: This patch fixes dist_clean target used to remove generated
## DP: files before packaging sources.

@DPATCH@
Index: Makefile.fpc
===================================================================
--- lazarus~/Makefile.fpc	(revision 13662)
+++ lazarus/Makefile.fpc	(working copy)
@@ -75,7 +75,7 @@
         
 #-----------------------------------------------------------------------------
 examples: lcl components
-        $(MAKE) -C examples
+#        $(MAKE) -C examples
 
 #-----------------------------------------------------------------------------
 all: lcl components packager/registration ideintf designer packager ide starter lazbuilder
@@ -94,11 +94,13 @@
 purge: cleanlaz
         $(MAKE) -C examples clean
         $(MAKE) -C tools clean
-        $(MAKE) -C doceditor clean
+#        $(MAKE) -C doceditor clean
         $(MAKE) -C tools clean
 
 clean: cleanlaz
 
+cleanall: purge
+
 # create dirs
 installbase:
 ifeq ($(OS_TARGET),win32)
 
Index: components/Makefile.fpc
===================================================================
--- lazarus~/components/Makefile.fpc	(revision 13662)
+++ lazarus/components/Makefile.fpc	(working copy)
@@ -18,12 +18,14 @@
       $(wildcard ./custom/*$(RSTEXT))
 
 [rules]
-.phony: bigidecomponents
+.PHONY: bigidecomponents bigideclean
 
 bigidecomponents: all
         $(MAKE) -C rtticontrols
+ifeq (${CPU_TARGET}, i386)
         $(MAKE) -C printers
         $(MAKE) -C printers/design
+endif
         $(MAKE) -C cgi
         $(MAKE) -C cgi/ide
         $(MAKE) -C turbopower_ipro
@@ -40,3 +42,24 @@
 endif
 
 cleanlaz: clean
+
+clean: bigideclean
+
+bigideclean:
+        $(MAKE) -C rtticontrols clean
+        $(MAKE) -C printers clean
+        $(MAKE) -C printers/design clean
+        $(MAKE) -C cgi clean
+        $(MAKE) -C cgi/ide clean
+        $(MAKE) -C turbopower_ipro clean
+        $(MAKE) -C jpeg clean
+        $(MAKE) -C fpcunit clean
+        $(MAKE) -C fpcunit/ide clean
+        $(MAKE) -C projecttemplates clean
+        $(MAKE) -C memds clean
+        $(MAKE) -C sdf clean
+        $(MAKE) -C tachart clean
+ifneq ($(OS_TARGET),darwin)
+        $(MAKE) -C tdbf clean
+        $(MAKE) -C sqldb clean
+endif
Index: tools/apiwizz/Makefile.fpc
===================================================================
--- lazarus~/tools/apiwizz/Makefile.fpc	(revision 13662)
+++ lazarus/tools/apiwizz/Makefile.fpc	(working copy)
@@ -13,7 +13,7 @@
 packages=rtl
 
 [clean]
-#units=apiwizard
+units=apiwizard
 
 [compiler]
 options=-gl $(LAZARUS_LIBPATHS)
Index: lcl/interfaces/gtk2/Makefile.fpc
===================================================================
--- lazarus~/lcl/interfaces/gtk2/Makefile.fpc	(revision 13662)
+++ lazarus/lcl/interfaces/gtk2/Makefile.fpc	(working copy)
@@ -14,10 +14,9 @@
 implicitunits=gtk2int
 
 [compiler]
-options=-gl -dgtk2
+options=-gl -dgtk2 -Fi../gtk
 unitdir=../../units/$(CPU_TARGET)-$(OS_TARGET) ../gtk .
 unittargetdir=../../units/$(CPU_TARGET)-$(OS_TARGET)/gtk2
-includedir=../gtk
 
 [clean]
 files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \
Index: examples/Makefile.fpc
===================================================================
--- lazarus~/examples/Makefile.fpc	(revision 13662)
+++ lazarus/examples/Makefile.fpc	(working copy)
@@ -37,6 +37,9 @@
 
 [clean]
 files=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) \
+  $(wildcard units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) \
+  $(wildcard units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) \
+  $(wildcard trayicon/*$(OEXT)) $(wildcard trayicon/*$(PPUEXT)) \
   hello \
   bitbutton \
   checkbox \
@@ -56,6 +56,7 @@
   scrollbar \
   speedtest \
   synedit1 \
+  taborder \
   testall \
   toolbar \
   trackbar

